package isogame{
	
	import flash.display.BitmapData;
	import flash.events.Event;
	import flash.geom.Matrix;
	
	import isogame.Event.FileLoaderEvent;
	import isogame.FileLoader;
	

	
	public class DataParser	extends FileLoader{
		
		private var myBitmap:BitmapData;
		
		//---------------------------------------
		// CONSTRUCTOR
		//---------------------------------------
		public function DataParser(link:String){
			
			super(link);
			addEventListener(FileLoaderEvent.SUCCESS, parse);
		}
		
		//---------------------------------------
		// GETTER / SETTERS
		//---------------------------------------
		
		public function get bitmap():BitmapData{
			return myBitmap;
		}
		
		//---------------------------------------
		// PUBLIC METHODS
		//---------------------------------------
		
		
		//---------------------------------------
		// PRIVATE METHODS
		//---------------------------------------
		
		private function parse(event:Event):void{
			myBitmap = new BitmapData(super.data.width, super.data.height, false);
			
			myBitmap.draw(super.data, new Matrix());
			
		}
		
	}// end class
}// end package